ParcelLabel API
Create Label(s) - Domestic Oversized by Fliway
How to generate parcel labels for parcels using Fliway service
When generating parcel labels for packages using Fliway service, merchants are able to place Fliway jobs through our NZ Post API suite. Fliway will perform the delivery.
Fliway service needs to be enabled by NZ Post before a merchant can use the service. Please contact your NZ Post account manager to activate the service you require.
Resource URL
UAT:
https://api.uat.nzpost.co.nz/parcellabel/v3/labels
Production:
https://api.nzpost.co.nz/parcellabel/v3/labels
A unique consignment_id is returned once the details of the request are stored in the labeling database. One or multiple labels can be generated within a consignment (for Fliway Courier only), connote id for Fliway is generated as part of tracking numbers following the pattern NZP[0-9]{9}.
Request Parameters
For each of these services, the parameter requirements are similar but each service has slightly different requirements and needs to use the relevant service code. In the following table, we have provided which fields are required in the label request for a particular service.
Code samples for each of these separate service types are displayed further down this page.
Field Name | Description | Required for Courier? |
---|---|---|
carrier | Carrier of the parcel. Value must be FLIWAY | Yes - Fliway |
orientation | Print orientation of the label. Value must be PORTRAIT or LANDSCAPE. Default value is LANDSCAPE. | No |
logo_id | Unique identifier for merchants logo. The field is only relevant for Courier services | No |
format | Format of the label. Value must be PDF or PNG. Default Value is PDF. | No |
despatch_date | Date for despatching the parcels. Value format must be "yyyy-MM-dd'T'HH:mm:ss". | Yes |
notification_endpoint | Merchants Webhook URL to receive notification when the label has been generated. | No |
sender_reference_1 | Sender's reference for the consignment. Will be printed on the label. | No |
sender_reference_2 | Sender's reference. Will be printed on the Invoice | No |
account_number | Your NZ Post Billing Account number (9 or 5 series).This is highly recommended to pass in the API call to obtain your account rates. | No |
label_dimensions | An object specifying the label dimensions (in mm) upon which to print the label. If you are passing this object then the value should be 150x100 or 174x100 or empty string. If it is empty then default value is 174x100. This field is only mandatory to generate 150x100 dimensions label. | No |
paper_dimensions | An object containing the paper size upon which to print the label. See Paper Dimension Object Parameters below | No |
paper_dimensions.width_cm | Width the label to be printed to. Default value is 17.4. Note: To print on a 150x100 label this value must be set to ‘15.0’ | No |
paper_dimensions.height_cm | Height of the label to be printed to. Default value is 10 | No |
paper_dimensions.stationery_size | Paper size upon which to print the label. Must be A4 or A5. | No |
sender_details | An object containing the sender contact details. See Sender Details Object Parameters below. | Yes |
sender_details.name | Name of the sender | Yes |
sender_details.phone | Phone number of the sender. NO SPACES, DIGITS and '+' ONLY | Yes |
sender_details.email | Email address of the sender. | Yes |
sender_details.signatory | Name of the individual sending the parcel, this is used for customs purposes. | No |
sender_details.company_name | Company name of the sender. | No |
sender_details.site_code | Site code assigned to the address where the parcel will be picked up by the courier. This address is also used for the NZ Post manifest process. | Yes |
sender_details.customs_code | Customs code of the sender. | No |
receiver_details | An object containing the receiver contact details. See Receiver Details Object Parameters below | Yes |
receiver_details.name | Name of the receiver | Yes |
receiver_details.phone | Phone number of the receiver. NO SPACES, DIGITS and '+' ONLY | Yes |
receiver_details.email | Email address of the receiver. | Yes |
receiver_details.vat_number | The VAT or GST number of the receiver. The field should not be > 14 characters. | No |
receiver_details.registration_number | Registration number of the receiver required for Delivery Location Options. | No |
pickup_address | An object containing the sender pickup address details. See Pickup Address Rules and Parameters below | Yes (NB: this is used as the NZ return address for this service) |
pickup_address Rules | Only one of the following is required: address_id (highly desirable) OR dpid(highly desirable) OR site_code (highly desirable) OR street, suburb, city, and postcode. Use the city for addresses without suburbs. Address_id and dpid can be obtained using ParcelAddress API. Account managers set up site codes. | |
pickup_address.address_id | Address ID for the pickup address sourced from the ParcelAddress API | See pickup_address rules |
pickup_address.dpid | Delivery Point ID for the pickup address sourced from the ParcelAddress API | See pickup_address rules |
pickup_address.site_code | Site code of pickup address. Setup by Account Manager | See pickup_address rules |
pickup_address.company_name | Company name of the pickup address | No |
pickup_address.building_name | Building name of the pickup address. | No |
pickup_address.street | Street name of the pickup address. | See pickup_address rules |
pickup_address.suburb | Suburb of the pickup address | See pickup_address rules |
pickup_address.city | City of the pickup address | See pickup_address rules |
pickup_address.postcode | Postal or zip code of the pickup address. | See pickup_address rules |
pickup_address.state | Regional, provincial or county name of the pickup address. | No |
pickup_address.unit_type | Type of unit (if applicable) of the pickup address. | No |
pickup_address.unit_value | Value of the unit type. | Yes if pickup_address.unit_type is not blank |
pickup_address.floor | Floor of the pickup address. | No |
pickup_address.country_code | Two character country code of the pickup address. | No (this must be set to NZ if has value) |
pickup_address.instructions | Pickup instructions for courier | No |
delivery_address | An object containing the receiver delivery address details. See Receiver Address Object Parameters section | Yes |
delivery_address Rules | country_code (mandatory) AND only one of the following is required: address_id (highly desirable) OR dpid(highly desirable) OR site_code (highly desirable) OR street, suburb, city, and postcode. Use the city for addresses without suburbs. Address_id and dpid can be obtained using ParcelAddress API. Account managers set up site codes. | |
delivery_address.address_id | Address ID for the delivery address sourced from the ParcelAddress API | See delivery_address rules |
delivery_address.dpid | Delivery Point ID for the delivery address sourced from the ParcelAddress API | See delivery_address rules |
delivery_address.site_code | Site code of the pickup address. | See delivery_address rules |
delivery_address.building_name | Building name of the delivery address. | No |
delivery_address.company_name | Name of company that the parcel is being delivered to. | No |
delivery_address.street_number | Street number of the delivery address. | No but highly desirable |
delivery_address.street | Street name of the delivery address. | See delivery_address rules |
delivery_address.suburb | Suburb of the delivery address | See delivery_address rules |
delivery_address.city | City of the delivery address | See delivery_address rules |
delivery_address.state | State of the delivery address | No |
delivery_address.country_code | Two character country code of the delivery address. | Yes (this must be set to NZ) |
delivery_address.postcode | Postal or zip code of the delivery address. | See delivery_address rules |
delivery_address.unit_type | Type of unit (if applicable) of the pickup address. | No |
delivery_address.unit_value | Value of the unit type. | Yes if delivery_address.unit_type is not blank |
delivery_address.floor | Floor of the pickup address. | No |
delivery_address.instructions | Delivery instructions for courier | No |
parcel_details | An object containing the label details for each label in the consignment. See Parcel Details Object Parameters section | Yes |
parcel_details.service_code | Code to represent a delivery service. Value must be FLWY | Yes |
parcel_details.add_ons | Array of ancillary codes. Please refer to the Add ons section below for further details. All addons must be the same for each parcel. | No |
parcel_details.return_indicator | Indications if the label is used for returning items. Values must be OUTBOUND or RETURN, and the same for each parcel. | Yes |
parcel_details.description | The box size name on the label for the dispatching person to choose the correct box for packing. | No |
parcel_details.dimensions | An object containing the dimension details of a parcel. See Parcel Details - Dimension Object Parameters section. | Yes |
parcel_details.dimension Rules | For Courierpost labels that aren't Courierpost satchels, only one of the following is required: length_cm, width_cm, and height_cm OR volume_m3 (highly desirable | |
parcel_details.dimensions.length_cm | Length of the parcel. | See parcel_details.dimension rules |
parcel_details.dimensions.width_cm | Width of the parcel. | See parcel_details.dimension rules |
parcel_details.dimensions.height_cm | Height of the parcel. | See parcel_details.dimension rules |
parcel_details.dimensions.volume_m3 | Volume of the parcel. | See parcel_details.dimension rules |
parcel_details.dimensions.weight_kg | Physical weight of the parcel in kilograms. | Yes |
Fliway Addons
The following are available Fliway addons.
Add on Name | Description |
---|---|
FLHD | Fliway Home Delivery |
FLSR | Fliway Signature Required |
Fliway Add-on Rules
The following rules apply to add-on services included in a label request:
- Add-on services can only be present when the carrier is Fliway.
- All parcel addons and return indicator must be the same when the carrier is Fliway.
Example 1: Fliway Return label for a single parcel (174x100mm)
{
"carrier": "FLIWAY",
"orientation": "landscape",
"label_dimensions": "174x100",
"account_number": "91671234",
"format": "PDF",
"despatch_date": "2024-10-30T09:00:00",
"sender_reference_1": "Order1234",
"paper_dimensions": {
"width_cm": 15,
"height_cm": 10
},
"sender_details": {
"name": "Test Sender",
"phone": "12345678",
"email": "john.doe@nzpost.co.nz",
"company_name": "NZ Post",
"site_code": 96306
},
"pickup_address": {
"address_id": 12345,
"company_name": "TEST COMPANY",
"xstreet": "122 Kerwyn avenue",
"xsuburb": "East Tamaki",
"xcity": "Auckland",
"xstate": "AUK",
"country_code": "NZ",
"xpostcode": "2013",
"FullAddressWithNameAndCompany": "NZ Post test company",
"instructions": "test test 12345"
},
"receiver_details": {
"name": "test receiver",
"phone": "022345678",
"email": "john.doe@nzpost.co.nz"
},
"delivery_address": {
"is_collection": false,
"building_name": "Test Delivery Building Name",
"company_name": "Test Delivery Company Name",
"street": "58 Eskdale Road",
"suburb": "Papakowhai",
"city": "Porirua",
"country_code": "NZ",
"postcode": "5024",
"instructions": "Ask for Bubba at the reception."
},
"parcel_details": [
{
"service_code": "FLWY",
"add_ons": ["FLHD","FLSR"],
"return_indicator": "RETURN",
"description": "MY PERSIHABLE TEST",
"insured_valued_amount": 0,
"currency": "nzd",
"dimensions": {
"length_cm": 100.0,
"weight_kg": 31,
"width_cm": 149.0,
"height_cm": 10
}
}
]
}
Response Parameters
Field Name | Description | Mandatory |
---|---|---|
consignment_id | Unique identifier for the consignment if the request is successful. | Yes |
message_id | A unique ID for the API call | Yes |
success | Returns true if request is successful. Returns false if request is not successful. | Yes |
Sample Response
{
"consignment_id": "DVZQYF",
"message_id": "520f4fa0-22cc-11eb-b1e1-027414412442",
"success": true
}
\`\`\`